<?php

return [
    // 服务器配置
    'server' => [
        'host' => '0.0.0.0',
        'port' => 8765,
        'protocol' => 'text',  // 文本协议
        'worker_count' => 1
    ],

    // 命令配置
    'commands' => [
        'mul' => [
            'handler' => app\protocol\commands\MulCommand::class,
            'description' => '乘法运算: mul <x> <y>'
        ],
        'incr' => [
            'handler' => app\protocol\commands\IncrCommand::class,
            'description' => '自增运算: incr <x>'
        ],
        'div' => [
            'handler' => app\protocol\commands\DivCommand::class,
            'description' => '除法运算: div <x> <y>'
        ],
        'conv_tree' => [
            'handler' => app\protocol\commands\ConvTreeCommand::class,
            'description' => 'JSON转树结构: conv_tree <json_data>'
        ],
        'help' => [
            'handler' => app\protocol\commands\HelpCommand::class,
            'description' => '显示帮助信息'
        ]
    ]
];